<html>
<head><meta charset="utf-8"><title>meeting 2020-07-28 · t-compiler/wg-rfc-2229 · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/index.html">t-compiler/wg-rfc-2229</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-28.html">meeting 2020-07-28</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="205279507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-28/near/205279507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-28.html#205279507">(Jul 28 2020 at 19:26)</a>:</h4>
<p>1) This is going to be the last week of work we do before resuming late August, we entering the final exam period at our university. (Sorry, I should have probably should've brought this earlier, just didn't realize it's almost August). Current working branches:</p>
<ul>
<li>
<p>Capture information bridge: <a href="https://github.com/sexxi-goose/rust/tree/use_places_aman">https://github.com/sexxi-goose/rust/tree/use_places_aman</a>. <br>
To use the bridge you need the environment variable SG_NEW, to log results/ extra details for old/new style capture analysis have SG_VERBOSE env variable.</p>
</li>
<li>
<p>Tupled upvars <a href="https://github.com/rust-lang/rust/issues/57482">#57482</a>: <a href="https://github.com/sexxi-goose/rust/pull/21#pullrequestreview-456934982">https://github.com/sexxi-goose/rust/pull/21#pullrequestreview-456934982</a></p>
</li>
</ul>
<p>2) The bridge works for most cases.  Issues we ran into last couple weeks are listed here <a href="#narrow/stream/122651-general/topic/Debugging.20broken.20MIR/near/205158453">https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Debugging.20broken.20MIR/near/205158453</a><br>
We still need to make Rvalue more precise. Consider the following code</p>
<div class="codehilite"><pre><span></span><code><span class="k">struct</span> <span class="nc">X</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">str1</span>: <span class="nb">String</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">X</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">str1</span>: <span class="nc">format</span><span class="o">!</span><span class="p">(</span><span class="s">&quot;x&quot;</span><span class="p">)</span><span class="w"> </span><span class="p">};</span><span class="w"></span>

<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">c</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">_</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">x</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="p">};</span><span class="w"></span>

<span class="w">    </span><span class="n">c</span><span class="p">();</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>


<p>We see the following place being used within the closure </p>
<div class="codehilite"><pre><span></span><code>Not upvar: PlaceWithHirId { hir_id: HirId { owner: DefId(0:3 ~ drop_move[317d]::main[0]), local_id: 43 }, place: Place { base_ty: (), base: Rvalue, projections: [] } }
</code></pre></div>


<ul>
<li>
<p>Rvalues currently get ignored because we don't know what gets captured. This comes back to having an expression hir id or something stored with the Rvalue.</p>
</li>
<li>
<p>Since we start capture_information and fill it up as we see Places being used, we are unable to infer the type of the closure.</p>
</li>
<li>complete error message here: <a href="http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move.log">http://csclub.uwaterloo.ca/~a52arora/test_suite/drop_move.log</a></li>
</ul>
<p>3) Tupled upvars: Tests are failing.<br>
<a href="https://github.com/sexxi-goose/rust/pull/21#pullrequestreview-456934982">https://github.com/sexxi-goose/rust/pull/21#pullrequestreview-456934982</a></p>
<ul>
<li>Some places need to still check is_valid or the infcx to ensure if we need to be reading the upars tuple from the subs</li>
<li>
<p>Expected FnPtr found closure.<br>
<code>substs_a.as_closure().upvar_tys().next().is_none()</code> from <a href="https://github.com/sexxi-goose/rust/blob/master/src/librustc_typeck/check/coercion.rs#L775">here</a><br>
feels like would return true even if there was one captured variable.  We weren't able to find time to look into each failing case, so it is possible there is a mistake in the changes we made to this.</p>
</li>
<li>
<p>Errors with traits not having solutions</p>
</li>
</ul>



<a name="205519866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-28/near/205519866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-28.html#205519866">(Jul 30 2020 at 19:09)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> I just realized I missed our last meeting and never got back to you on this</p>



<a name="205519898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-28/near/205519898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-28.html#205519898">(Jul 30 2020 at 19:09)</a>:</h4>
<p>I didn't realize the exam period was coming up either :)</p>



<a name="205519976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-28/near/205519976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-28.html#205519976">(Jul 30 2020 at 19:10)</a>:</h4>
<p>do you want to maybe find a time to chat tomorrow (friday) to kind of "braindump" final status? not sure if it's necessary, maybe if I pour over the links above, that'll be enough</p>



<a name="205520062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-28/near/205520062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-28.html#205520062">(Jul 30 2020 at 19:11)</a>:</h4>
<p>Sure, I'm in a meeting rn, I'll get back in abt an hour</p>



<a name="205527948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-28/near/205527948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-28.html#205527948">(Jul 30 2020 at 20:23)</a>:</h4>
<p>How about 3pm tomorrow?</p>



<a name="205531072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-28/near/205531072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-28.html#205531072">(Jul 30 2020 at 20:53)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span></p>



<a name="205534203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-28/near/205534203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-28.html#205534203">(Jul 30 2020 at 21:22)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> ok</p>



<a name="205534266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-28/near/205534266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-28.html#205534266">(Jul 30 2020 at 21:23)</a>:</h4>
<p>I have updated the calendar event for tomorrow</p>



<a name="205628161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-28/near/205628161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-28.html#205628161">(Jul 31 2020 at 18:55)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> do we plan to chat on zulip or zoom?</p>



<a name="205628326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-28/near/205628326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-28.html#205628326">(Jul 31 2020 at 18:56)</a>:</h4>
<p>I'm fine with either, whatever you're more comfortable with</p>



<a name="205628377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-28/near/205628377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-28.html#205628377">(Jul 31 2020 at 18:57)</a>:</h4>
<p>let's do Zulip if that works for you</p>



<a name="205628382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/meeting%202020-07-28/near/205628382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/meeting.202020-07-28.html#205628382">(Jul 31 2020 at 18:57)</a>:</h4>
<p>I guess I'll make a new topic</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>